from pyecharts.charts import Pie
from datetime import datetime
from pyecharts.globals import ThemeType
from pyecharts import options as opts

now_time = datetime.now().strftime('%Y-%m-%d')  # 获取当前时间
big_title = (
    Pie(init_opts=opts.InitOpts(theme=ThemeType.LIGHT))  # 不画图，只显示一个标题，用来构成大屏的标题
        .set_global_opts(
        title_opts=opts.TitleOpts(title="疫情分析可视化大屏",
                                  title_textstyle_opts=opts.TextStyleOpts(font_size=40,
                                                                          color='#CCFFFF',
                                                                          font_style='oblique'
                                                                          ),
                                  #                                   subtitle = f'截至：{now_time}',
                                  #                                   pos_top=0,

                                  )
    )
)
big_title.render("../outHTML/title.html")